<div class="overview-left">
  <div>
    <p>安全运行天数</p>
    <p>{{runDays}}</p>
  </div>
  <div>
    <div echarts [options]="chartOption1" class="left-echart-first"></div>
    <button nz-button [nzSize]="'small'" [nzType]="'primary'" (click)="isVisible=true">更多</button>
  </div>
  <div style="position: relative;">
    <div echarts [options]="chartOption2" class="left-echart-second" (chartInit)="chartObject2 = $event"></div>
    <div id="left-button-group">
      <button (click)="faultRateType = 'M';loadFaultRate()">月</button>
      <button (click)="faultRateType = 'Y';loadFaultRate()">年</button>
    </div>
  </div>

</div>
<nz-modal nzCentered [nzVisible]='isVisible' nzTitle='变压器负荷详情' [nzMask]='false' (nzOnCancel)='handleCloseOrCancel()'
          nzWidth='710px'>
  <div *nzModalContent>
    <div>
      <form nz-form [formGroup]="validateForm" (ngSubmit)="submitForm()" class="left-modal-form">
        <nz-form-item>
          <nz-form-label nzRequired>
            选择变压器
          </nz-form-label>
          <nz-form-control nzErrorTip="请选择变压器！">
            <nz-select nzPlaceHolder="请选择" formControlName='zhubian'>
              <nz-option nzValue="A" nzLabel="变压器A"></nz-option>
              <nz-option nzValue="B" nzLabel="变压器B"></nz-option>
              <nz-option nzValue="C" nzLabel="变压器C"></nz-option>
              <nz-option nzValue="D" nzLabel="变压器D"></nz-option>
            </nz-select>
          </nz-form-control>
        </nz-form-item>
        <nz-form-item>
          <nz-form-label nzRequired>
            选择月份
          </nz-form-label>
          <nz-form-control nzErrorTip="请选择月份！">
            <nz-date-picker nzMode="month" formControlName='month'></nz-date-picker>
          </nz-form-control>
        </nz-form-item>
        <nz-form-item>
          <nz-form-control>
            <button nz-button nzType="primary" type="submit" (click)="onQuery()">查询</button>
          </nz-form-control>
        </nz-form-item>

      </form>
      <table class="left-modal-table">
        <tr>
          <th>最大负荷率</th>
          <th>持续时间（秒）</th>
        </tr>
        <tr>
          <td *ngIf="rate">{{rate}}%</td>
          <td *ngIf="second">{{second}}s</td>

        </tr>
      </table>

    </div>

  </div>
  <div *nzModalFooter class="modalFooter">
    <button nz-button nzType="default" (click)="handleCloseOrCancel()">关闭</button>
  </div>
</nz-modal>
